package countDigits;

public class Solution {
    public int countDigits(int num) {
        int count=0;
        int t=num;
        while(t>0){
            int v=t%10;
            if(num%v==0){
                count++;
            }
            t/=10;
        }
        return count;
    }
}
